from django.conf.urls import patterns, include, url
from login.views import *
from employee.views import *
from lunch_date.views import *
from project_team.views import *

#http://daringfireball.net/2010/07/improved_regex_for_matching_urls

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'esync.views.home', name='home'),
    # url(r'^esync/', include('esync.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),

    url(r'^hello/$', hello),

    # Login / Logout
    url(r'^login/$',                                        login),
    url(r'^logout/$',                                       logout),

        # Employees
    url(r'^employees/$',                                    get_all_employees),
    url(r'^employees/search$',                              search_for_employee),
    url(r'^employees/match/(?P<antendee1>\d+)$',            match_employee),
    # url(r'^employees/match/$',                            match_employee),

    # Lunch Date
    url(r'^appointments/$',                                 get_appointments),
    url(r'^appointments/\d+$',                               get_appointment_by_id),
    url(r'^appointments/create/$',                           create_appointment),
    url(r'^appointments/update/\d+$',                        update_appointment_by_id),
    url(r'^appointments/delete/\d+$',                        delete_appointment_by_id),
    url(r'^appointments/update/\d+/status/[A-Za-z]+$',       update_appointment_by_id_status),
    url(r'^appointments/update/\d+/location/[A-Za-z]+$',     update_appointment_by_id_location),
    url(r'^appointments/search$',                           search_appointments),
      
    # Project Team
    url(r'^teams$',                                         get_existing_teams),
  	url(r'^teams/create$',                                  create_new_team),
    url(r'^teams/\d+$',                                      get_team_by_id),
    url(r'^teams/update\d+$',                                update_team_by_id),
  	url(r'^teams/search$',                                  search_for_team),
    url(r'^teams/generate$',                                generate_team),
)
